# Zope 3 imports
from zope.interface import Interface


class IBaseTrackback(Interface):
    """Represents a trackback.
    """

    def getTitle():
        """Return the title.
        """

    def getExcerpt():
        """Return the excerpt that will be sent as part of the ping.
        """

    def getURL():
        """Return the URL of the trackback source.
        """

    def getSiteTitle():
        """Return the site/blog title.
        """


class IRequestAwareTrackback(IBaseTrackback):
    """Represents a trackback that knows things about the REQUEST that created
    it.
    """

    def getPingedObject():
        """Return the object that this trackback ping was actually sent to.
        """

    def getDatetimeReceived():
        """Return a datetime object representing when the trackback was
        received.
        """

    def getUserIP():
        """IP address of the comment submitter.
        (Required.)
        """

    def getUserAgent():
        """User agent information.
        (Required.)
        """

    def getReferrer():
        """The content of the HTTP_REFERER header should be sent here.
        """



class IStoredTrackback(IRequestAwareTrackback):
    """Represents a stored/persistent trackback.
    """

    def getId():
        """Return the Id, acts like an id in a folder.
        """


TRACKBACK_UNKNOWN = 0
TRACKBACK_ACCEPTED = 1
TRACKBACK_DUBIOUS = 2
TRACKBACK_REJECTED = 3

class IWorkflowedTrackback(IRequestAwareTrackback):
    """
    """

    def getStatus():
        """Return the status of this trackback. That is, one of `UNKNOWN',
        `ACCEPTED', `DUBIOUS', or `REJECTED'.
        """

    def accept():
        """Mark the trackback as accepted.
        """

    def makeDubious():
        """Mark the trackback as dubious.
        """

    def reject():
        """Mark the trackback as rejected - which implies deleting it.
        """


